﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="PswModify.aspx.cs" Inherits="main_admin_PswModify" %>
<%@ Register TagPrefix="uc" Namespace="cde.UserControl" Assembly="cde.UserControl" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>修改密码</title>
<link href="../../css/style.css" rel="stylesheet" type="text/css" />
<link href="../../css/base.css" rel="stylesheet" type="text/css" />
<script src="../../js/base.js" type="text/javascript" charset="utf-8"></script>
<script src="../../js/singleeditpoint.js" type="text/javascript" charset="utf-8"></script>
<script src="../../js/validator.js" type="text/javascript" charset="utf-8"></script>
<script src="../../js/comm.js" type="text/javascript" charset="utf-8"></script>
<script src="../../js/common.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
   function fCheck() {
     //清除空格	
    TrimAllitems();       
    ClearErrMsg();        
    var thisForm=document.forms[0];
	if( Validator.Validate(thisForm,3))
	{　
        var thisForm = document.forms[0];
        var PassWord=document.getElementById("txt_PSW_OLD")
        var PassWord1=document.getElementById("txt_PSW_NEW")
        var PassWord2=document.getElementById("txt_PSW_CON")
        
        //旧密码不能为空
        if (PassWord.value == "") {
            showErrMsg(PassWord,"请输入旧密码！");
            PassWord.focus();
            return false;
        }
        //旧密码位数必须在3～20之间
        if(PassWord.value.length<3||PassWord.value.length>20)
        {
         showErrMsg(PassWord,"旧密码为3～20位字符串！");
            PassWord.focus();
            return false;
        }
        //新密码不能为空
        if (PassWord1.value == "") {
            showErrMsg(PassWord1,"请输入新密码！");
            PassWord1.focus();
            return false;
        }
        //新密码位数必须在3~20之间
         if(PassWord1.value.length<3||PassWord.value.length>20)
        {
         showErrMsg(PassWord1,"新密码为3～20位字符串！");
            PassWord1.focus();
            return false;
        }
        //确认密码不能为空
        if (PassWord2.value == "") {
            showErrMsg(PassWord2,"请再次输入新密码！");
            PassWord2.focus();
            return false;
        }
        //确认密码位数必须在3~20之间
          if(PassWord2.value.length<3||PassWord.value.length>20)
        {
         showErrMsg(PassWord2,"确认密码为3～20位字符串！");
            PassWord2.focus();
            return false;
        }
        //确认密码必须和新密码相同
        if (PassWord2.value != PassWord1.value ) {
            showErrMsg(PassWord2,"新密码两次不相同！");
            PassWord1.focus();
            return false;
        }
            return true;
	}
		   return false;
	}

         function closeWin(){
         window.opener.location="javascript:reloadPage();";
         window.opener=null;
         window.close();

         return false;
         }

</script>
<style type="text/css">
    .style1
    {
        width: 74px;
    }
</style>
    
</head>
<body>
  <form id="form1" runat="server">
    <div class="conter_right">
      <div class="sfkr"><a href="#">修改密码</a></div>
     	<fieldset class="dsadq"><legend style="color:#434449">修改密码</legend>
           <table width="100%" border="0" cellpadding="0" cellspacing="0" class="msels">
              <tr>
                    <td width="25%" align="right" valign="middle"><asp:Label ID="Label1" runat="server" Text="当前密码"></asp:Label>：</td>
                    <td width="75%" align="left" valign="middle">
                    <input id="txt_PSW_OLD" name="txt_PSW_OLD" type="password" datatype="Require" msg="当前密码不能为空！" class="srjks"
                                    value="" maxlength="20" runat="server" />
                    <asp:Label ID="err_PSW_OLD" runat="server"></asp:Label></td>
              </tr>
              <tr>
                    <td width="25%" align="right" valign="middle"><asp:Label ID="Label2" runat="server" Text="新密码"></asp:Label>：</td>
                    <td width="75%" align="left" valign="middle">
                     <input id="txt_PSW_NEW" name="txt_PSW_NEW" type="password" value="" maxlength="20" runat="server" class="srjks"
                                   msg="新密码不能为空！"/>
                               <asp:Label ID="err_PSW_NEW" runat="server"></asp:Label></td>
              </tr>
              <tr>
                    <td width="25%" align="right" valign="middle"><asp:Label ID="Label4" runat="server" Text="确认新密码"></asp:Label>：</td>
                    <td width="75%" align="left" valign="middle">
                    <input id="txt_PSW_CON" name="txt_PSW_CON" type="password" value="" maxlength="20" runat="server" class="srjks"
                                    msg="确认密码不能为空！"/>
                               <asp:Label ID="err_PSW_CON" runat="server"></asp:Label></td>
              </tr>
           </table>
        </fieldset>      
    </div>
    <div style="height:15px"></div>
    <div class="nstkaah" align="center" style="width:90%">
         <asp:Button ID="save" runat="server" Text="保存"  OnClick="OnSave" OnClientClick="return fCheck();" CssClass="seaal"/>                                          
         <asp:Button ID="Button1" runat="server" Text="返回"  CssClass="seaal" OnClientClick="return closeWin();"/>      
    </div>
  </form>
</body>
</html>             
              
              
              
              
              
              
              
              
<%--                <td>
                   <div class="content_right_cont">
                      <table width="100%" border="0" cellspacing="3" cellpadding="0">
                         <tr align="center">
                            <td align="right" class="style1">
                               <asp:Label ID="Label1" runat="server" Text="当前密码"></asp:Label>：
                            </td>
                            <td  align="left">
                               <input id="txt_PSW_OLD" name="txt_PSW_OLD" type="password" datatype="Require" msg="当前密码不能为空！"
                                    value="" maxlength="20" runat="server" />
                               <asp:Label ID="err_PSW_OLD" runat="server"></asp:Label>
                            </td>
                         </tr>
                         <tr align="center">
                            <td align="right" class="style1">
                               <asp:Label ID="Label3" runat="server" Text="新密码："></asp:Label>
                            </td>
                            <td  align="left">
                               <input id="txt_PSW_NEW" name="txt_PSW_NEW" type="password" value="" maxlength="20" runat="server" 
                                   msg="新密码不能为空！"/>
                               <asp:Label ID="err_PSW_NEW" runat="server"></asp:Label>
                            </td>
                         </tr>
                         <tr align="center">
                            <td align="right" class="style1">
                               <asp:Label ID="Label4" runat="server" Text="确认新密码："></asp:Label>
                            </td>
                            <td  align="left">
                               <input id="txt_PSW_CON" name="txt_PSW_CON" type="password" value="" maxlength="20" runat="server" 
                                    msg="确认密码不能为空！"/>
                               <asp:Label ID="err_PSW_CON" runat="server"></asp:Label>
                             </td>
                         </tr>
                      </table>
                   </div>
                </td>
            </tr>
            <tr align="center">
                <td>
                    <div >
                       <table border="0" cellspacing="15" cellpadding="0">
                           <tr align="center">
                              <td>
                                 <asp:Button ID="save" runat="server" Text="保存" Width="67px" OnClick="OnSave"
                                       class="btn" OnClientClick="return fCheck();" CssClass="seaal"/>
                                            
                                  <asp:Button ID="Button1" runat="server" Text="取消" Width="67px" 
                                        class="btn"  CssClass="seaal"/>                                  
                               </td>
                           </tr>
                       </table>
                    </div>
                </td>
            </tr>    
         </table>--%>

